<template>
<div>
login
<el-button @click="login">登录</el-button>
</div>
</template>

<script  setup>
import {useRouter} from 'vue-router'

const router=useRouter()
const login =()=>{
console.log('登录')
router.push('/')
}
</script>

<style lang="scss" scoped>

</style>